﻿<%@ Page Language="C#" Title="File Manager" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="FileManager.aspx.cs" Inherits="Kiosk.WebManagement.FileManager" %>
<asp:Content ContentPlaceHolderID="head" ID="headContent" runat="server" >
    <style type="text/css">
        .style1
        {
            width: 439px;
        }
    </style>
</asp:Content>
<asp:Content ContentPlaceHolderID="content" ID="bodyContent" runat="server">

        <div class="TopContent">&nbsp;</div>

    <div class="MiddleContent">
        <p style="margin:0px 0px 0px 50px;">
        Upload a File: <br />
        <asp:FileUpload ID="fileUpload" runat="server" />
        &nbsp;
            <asp:Button ID="btnUpload" runat="server" Text="Upload" 
                onclick="btnUpload_Click" />
                <br /><br />
            <asp:Label style="background-color:#FF9999; padding:3px; color:#FF0000; border: solid 1px #FF0000;" ID="lblFileWarning" runat="server" Text="Error creating file" Visible=false></asp:Label>
        </p>
       
    </div>
    <div class="BottomContent" >&nbsp;</div>
    <br /> <br />
        <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    <div class="TopContent">&nbsp;</div>

    <div class="MiddleContent">
<%--        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
--%>                <asp:Panel ID="pnlFiles" runat="server">
                    <table style="margin:0px 0px 0px 50px;">
                    <tr>
                        <td class="style1">
                           <asp:GridView ID="grdFiles" runat="server" AutoGenerateColumns="False" 
                                CellPadding="4" ForeColor="White" GridLines="None" 
                                onrowdeleting="grdFiles_RowDeleting" 
                                onselectedindexchanging="grdFiles_SelectedIndexChanging" Width="80%">
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <Columns>
                                    <asp:CommandField ButtonType="Image" HeaderText="Select" 
                                        SelectImageUrl="~/images/icons/resultset_next.png" ShowSelectButton="True">
                                        <ItemStyle Width="40px" />
                                    </asp:CommandField>
                                    <asp:CommandField ButtonType="Image" HeaderText="Delete" DeleteImageUrl="~/images/icons/delete.png" 
                                        ShowDeleteButton="True" />
                                    
                                    <asp:BoundField DataField="FileName" HeaderText="File"  
                                        SortExpression="FileName" />
                                </Columns>
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <EmptyDataTemplate>
                                    No uploaded files
                                </EmptyDataTemplate>
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#3c3c3c" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#999999" />
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                            </asp:GridView>
                        </td>
                        <td style="text-align:center;">
                            Preview File:
                            <br />
                            <asp:Image ID="imgPreview" runat="server" Width="150px" />
                            <br />
                            <asp:Label ID="lblPreviewText" runat="server" Text="No Preview available" 
                                Visible="False"></asp:Label>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
 
<%--            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger />
            </Triggers>
        </asp:UpdatePanel>--%>
    </div>
    <div class="BottomContent" >&nbsp;</div>
</asp:Content>